<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<script src="http://maps.google.com/maps/api/js?sensor=false"
		type="text/javascript"></script>
	<style>
.ui-datatable tbody td.wrap {
	white-space: normal;
}
</style>
</h:head>
<h:body>
	<p:layout fullPage="true">

		<p:layoutUnit position="north" size="115">
			<table border="0" width="100%">
				<tr>
					<td><h:form>
							<p:tabMenu activeIndex="3">
								<p:menuitem value="Map" url="/index.xhtml" icon="ui-icon-image" />
								<p:menuitem value="Statistics" url="/stat.xhtml"
									icon="ui-icon-signal" />
								<p:menuitem value="Top Videos" url="/top.xhtml"
									icon="ui-icon-video" />
								<p:menuitem value="All Posts/Videos" url="/list_all.xhtml"
									icon="ui-icon-star" />
								<p:menuitem value="Wiki"
									url="http://smm.informatik.haw-hamburg.de:11000/wiki/en/Main"
									icon="ui-icon-wrench" />
							</p:tabMenu>
						</h:form></td>
					<td width="10%"><h:outputLink
							value="http://www.gnu.org/licenses/lgpl" title="lgpl">
							<h:graphicImage
								value="http://www.gnu.org/graphics/lgplv3-147x51.png"
								height="50" style="border: 0px" />
						</h:outputLink></td>
				</tr>
				<tr>
					<td colspan="2"><center>
							<h:outputText id="Title"
								value="Open-Source Social Media Monitoring Toolbox" />
						</center></td>
				</tr>
			</table>
		</p:layoutUnit>

		<p:layoutUnit position="west" size="225" header="Streams"
			resizable="true" closable="true" collapsible="true">
			<h:form>
				<p:selectOneButton value="#{streamList.selectedOption}">
					<f:selectItem itemLabel="Twitter"
						itemValue="#{streamList.getTwitter()}" />
					<f:selectItem itemLabel="YouTube"
						itemValue="#{streamList.getYoutube()}" />
					<p:ajax update=":lay"
						listener="#{listAllBean.updateAllList(ae, streamList.selectedOption)}"
						event="change" />
				</p:selectOneButton>
			</h:form>
		</p:layoutUnit>

		<p:layoutUnit position="center" size="225" header="Top Posts"
			resizable="true">
			
			<p:dataTable id="lay" var="post" value="#{listAllBean.lazyModel}"
				paginator="true" rows="25" dynamic="true"
				paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
				rowsPerPageTemplate="5,10,15,25,40" lazy="true">

				<p:column headerText="Nr" width="3">
					<h:outputText value="#{post.id}" />
				</p:column>
				<p:column headerText="Name" width="500" styleClass="wrap">
					<h:outputText value="#{post.name}" />
				</p:column>
				<p:column headerText="Sentiment" width="100" styleClass="wrap">
					<h:outputText value="#{post.sentiment}" />
				</p:column>
			</p:dataTable>
		</p:layoutUnit>

	</p:layout>
</h:body>
</html>